<template>
	<div class="agreement">
		<p v-html="state.content"></p>
	</div>
</template>

<script setup lang="ts">
import { ref, reactive, onMounted } from 'vue';
import { globalConfigValue } from '@/api/common';
import {useRoute} from "vue-router";

const route = useRoute();

const state = reactive<any>({
  type: route.query.type,
	content: ''
});

onMounted(() => {
	getGlobalConfigValue();
});

const getGlobalConfigValue = async () => {
	const res = await globalConfigValue(state.type);
	state.content = res.data.item_value;
};
</script>

<style lang="scss" scoped>
.agreement {
	padding: 15px;
	:deep(img) {
		width: 100%;
		height: 100%;
		border-radius: 3px;
	}
	:deep(p) {
		color: #52545d;
		font-size: 14px;
		line-height: 24px;
	}
}
</style>
